var http = require('http');
var url = require('url');
var router = require('./models/router');
var optfile = require('./models/optfile');
http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'image/jpeg'});
  if(request.url !== '/favicon.ico') { //清除第二次访问
    console.log('访问');
    optfile.readImg('./imgs/demo.jpeg', response);
    console.log('继续执行');
  }
}).listen(8000);
console.log('Server running at http://localhost:8000/');
